package see.battle;

public class Utils {
  public static boolean isInsideRect(float x, float y, 
      int w, int h, int button) {
    switch (button) {
      case 1 : return ((x > Const.selectionButtonOneLeft * w) &&
        (x < (Const.selectionButtonOneLeft + 
            Const.selectionButtonOneWidth) * w) &&
            (y > Const.selectionButtonOneTop * h) &&
            (y < (Const.selectionButtonOneTop + 
                Const.selectionButtonOneHeight) * h));
      case 2 : return ((x > Const.selectionButtonTwoLeft * w) &&
          (x < (Const.selectionButtonTwoLeft + 
              Const.selectionButtonTwoWidth) * w) &&
              (y > Const.selectionButtonTwoTop * h) &&
              (y < (Const.selectionButtonTwoTop + 
                  Const.selectionButtonTwoHeight) * h));
    } 
    return false;
  }
}
